import React from 'react'
import store from "@/store"
import { increment, decrement } from "@/store/actions/countAction"

export default function Count() {
  console.log(store);
  console.log(store.getState());
  return (
    <div>
      <h1>Count:{store.getState().count}</h1>
      <button onClick={() => {
        store.dispatch(increment)
      }}>累加count</button>
      <button onClick={() => {
        store.dispatch(decrement)
      }}>累减count</button>
    </div>
  )
}
